import React, { Component } from 'react';
import {Link} from 'react-router';
import InformationComponent from '../../Component/OrderManage/InformationComponent';
import Top from '../CommonComponent/Top'
import Empty from '../../Component/CommonComponent/Empty';
import CommonBtn from '../../Component/CommonComponent/CommonBtn';
import {AddressList} from '../../Action/auth'

export default class BuyFirst extends Component {

    // 构造
    constructor(props) {
        super(props);
        // 初始状态
        this.state = {
            addressList : []
        };
    }

    async componentWillMount() {
        await this.getAddressList()
    }

    async getAddressList(){
        await AddressList()
            .then(res=>{
                this.setState({addressList:res.resultList})
            })
            .catch(err=>{
                console.warn('获取地址列表错误',err)
            })
    }

    render() {
        const {addressList} = this.state
        console.log('addressList=======>',addressList == '')
        return (
            <div className="containerNav">
                <Top
                    title = {'首次购买'}
                />
                <div style={{padding:'50px 10% 20px'}}>
                    <div className="tc f16" style={{marginBottom:20}}>恭喜成为维魅力合伙人级别的代理</div>
                    <ul className="f14">
                        <li>1、请购买不低于1000元的产品</li>
                        <li>2、请购买不低于1000元的产品</li>
                        <li>3、请购买不低于1000元的产品</li>
                    </ul>
                </div>
                <div className="flex pf width100" style={{bottom:40}}>
                    <Link to="/malls" className="flex-1">
                        <CommonBtn
                            title={'去进货'}
                        />
                    </Link>
                </div>
            </div>
        );
    }
}
